A Novel Approach to Unit Testing: The Aspect-Oriented Way
نویسندگان
چکیده
Unit testing is a methodology for testing small parts of an application independently of whatever application uses them. It is time consuming and tedious to write unit tests, and it is especially difficult to write unit tests that model the pattern of usage of the application they will be used in. Aspect-Oriented Programming (AOP) addresses the problem of separation of concerns in programs which is well suited to unit test problems. On the other hand, unit tests should be made from different concerns in the application instead of just from functional assertions of correctness or error. In this paper, we firstly present a new concept, application-specific Aspects, which mean top-level aspects picked up from generic low-level aspects in AOP for specific use. It can be viewed as the separation of concerns on applications of generic low-level aspects. Second, this paper describes an Aspect-Oriented Test Description Language (AOTDL) and techniques to build top-level aspects for testing on generic aspects. Third, we generate JUnit unit testing framework and test oracles from AspectJ programs by integrating our tool with AspectJ and JUnit. Finally, we use runtime exceptions thrown by testing aspects to decide whether methods work well.
منابع مشابه
Data-Flow-Based Unit Testing of Aspect-Oriented Programs
The current research so far in aspect-oriented software development is focused on problem analysis, software design, and implementation techniques. Even though the importance of software testing is known, it has received little attention in the aspect-oriented paradigm. In this paper, we propose a data-flow-based unit testing approach for aspectoriented programs. Our approach tests two types of...
متن کاملAutomated State-Based Unit Testing for Aspect-Oriented Programs: A Supporting Framework
Interactions between aspects and classes are a new source for faults. Existing objectoriented testing techniques are not adequate for testing aspect-oriented programs. As a consequence, new testing techniques must be developed. We present, in this paper, a state-based unit testing technique for aspect-oriented programs and associated tool (AJUnit). The technique focuses on the integration of on...
متن کاملAn Aspect Oriented-based Architectural Framework for Synchronization in Measurement Systems
An Aspect-Oriented approach to software synchronization in automatic measurement systems is proposed. Tasks are synchronized by means of “aspects”, a specific software unit to better modularize properties and features transversal to many modules (“crosscutting concerns”). In this way, maintainability and reusability of a measurement software are improved: once a modification in the synchronizat...
متن کاملIncremental Modular Testing for AOP
By designing systems as sets of modules that can be composed into larger applications, developers unleash a multitude of advantages. The promise of AOP (Aspect-Oriented Programming) is to enable developers to organize crosscutting concerns into separate units of modularity making it easier to accomplish this vision. However, AOP does not allow unit tests to be untangled, which impairs the devel...
متن کاملIntegration testing of Object-Oriented and Aspect-Oriented programs: A structural pairwise approach for Java
Several testing approaches focus on finding faults in software units of implementation. A problem not addressed by unit testing is the interaction among units, with respect to the correctness of their interfaces. In this paper a structural integration testing approach for Object-Oriented (OO) and Aspect-Oriented (AO) Java programs is presented. To make the activity more feasible, we address the...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004